Recording and reproducing apparatus and receiving apparatus

ABSTRACT

Where a clock frequency based on which encoding is performed has deviated over time, problems such as that an appropriate digital signal can not be outputted occur. To solve the problems, it is arranged such that when a decoder decodes video data and audio data, a control variable for controlling a frequency of a clock recovered by a clock generating portion is recorded as needed in a recording portion, and when the decoder decodes data recorded in the recording portion, the clock generating portion is controlled by using the control variable so that system time information generated by the counter synchronizes with time information extracted upon reception of a digital broadcasting program.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. Ser. No. 11/367,457, filedMar. 6, 2006, now U.S. Pat. No. 7,529,164, the contents of which areincorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a transport stream recording andreproducing apparatus and a method of reproducing a transport stream.

Among the MPEG (Moving Picture Experts Group) standards that areinternational standards, there is the MPEG-2 standard to be applied tocommunications systems and broadcasting systems. One of specific formsof MPEG-2 systems is the MPEG-2 Transport Stream (which will beabbreviated as MPEG2-TS) suitable for storage or transmission inenvironments where errors are likely. According to the MPEG2-TS, a PCR(Program Clock Reference) as a time information value is forwarded bymultiplexing, so that a receiving apparatus can reproduce video andaudio in synchronization as intended by a transmitter, by referencingthe PCR.

JP-A-10-11902 discloses a technique to obtain a system clockphase-locked with the PCR, by supplying an oscillator a control signalbased on frequency information recorded in a memory upon recording of aprogram, and having the oscillator generate a system clock based on thecontrol signal.

SUMMARY OF THE INVENTION

To clarify description of the invention, there will be first describedbriefly an operation to receive and reproduce a digital broadcastingprogram by a receiving apparatus.

Initially, a PAT (Program Association Table) and a PMT (Program MapTable) are extracted from an inputted TS (Transport Stream), and PIDs(Packet IDs) related to the program of interest are determined. TSpackets with the determined PIDs are extracted, and data of the packetsis separated into video, audio, and PCR.

Then, the value of the received PCR is set as an initial value of acount of a STC (System Time Clock) counter, and the STC counterthereafter counts up. At a timing when a DTS (Decoding Time Stamp)accompanying each packet of video data coincides with the count, videodata of that packet is decoded. At a timing when a PTS (PresentationTime Stamp) accompanying each packet of video or audio data coincideswith the count, video or audio data of that packet is presented.

The frequency at which the STC counter counts is defined by the MPEG2-TSstandard to be 27 MHz±30 ppm. To control the increase rate of the countof the STC counter, a PWM (Pulse Width Modulator) control may beemployed, where the STC counter counts at a frequency based on clockpulses generated by an oscillator, that is, the STC counter counts at afrequency of 27 MHz that is a divisor of 54 MHz that is a frequency ofthe clock pulses generated by the oscillator, for instance. In the PWMcontrol, there is made a comparison between the value of the PCR that isperiodically received, and the count of the STC counter, and a pulsewidth or an interval of output pulses of the oscillator is adjusted inorder to eliminate or decrease an obtained error therebetween. Wheresignals of a plurality of digital broadcasting programs are received,one of a plurality of PCRs for the respective programs is selected to bereferenced in the PWM control. Thus, when receiving a digitalbroadcasting program, a stable clock recovery is enabled by referencingthe PCR.

On the other hand, when a digital broadcasting program is reproducedfrom a recording medium, the reproduction may be performed withintervals of transmission of packets not made even. For instance, thereis a reproduction method (which will be referred to as “flow controlledreproduction”) where a decoder controls data transmission from arecording medium depending on a decode capability of the decoder. Inthis method, an input of a stream to the decoder is performedirrespective of the PCR, and thus it is impossible to perform the clockrecovery by referencing the PCR. Hence, in the case where the flowcontrolled reproduction is implemented, or where it can not be expectedthat the PCR obtained is accurate, the system performs the clockrecovery by using a constant set value. However, the thus generatedfrequency differs from an apparatus to apparatus due to design error ofcircuitry, characteristics of the oscillator, and others, or deviatesfrom 27 MHz each time reproduction is implemented. When an amount of thedifference or the deviation is such that the generated frequency fallswithin the range of 27 MHz±30 ppm as defined by the MPEG-2 standard,reproduction is performed without problems. When the difference ordeviation is large and the generated frequency falls outside the rangedefined by the MPEG-2 standard, there occur problems such as bufferoverflow or underflow during reproduction for a long time, and NTSCsignals incapable of being correctly outputted.

In a digital broadcast signals recording and reproducing apparatus thatincludes an encoder and makes an output to an external recordingapparatus such as that of D-VHS, when a clock frequency based on whichencode processing is performed differs or deviates, problems such asdigital signals incapable of being correctly outputted occur, similarlyto the case of the reproduction from a recording medium as describedabove.

Therefore, there is requested a control method for stably recovering aclock when reproduction from a recording medium is implemented, or whenencoding is performed.

In the technique disclosed in the above-mentioned publication, theoscillator is supplied with the control signal based on the frequencyinformation recorded in the memory upon recording of the program inorder that the oscillator generates the system clock based on thefrequency information. According to this technique, the frequencyinformation recorded in the memory is fixed after once recorded. Thus,where the flock frequency based on which encoding is performed comes todeviate due to aging of the apparatus or for other reasons after apredetermined time, the above-described problems such as digital signalsnot appropriately outputted occur. That is, change of a device over timeis not sufficiently considered.

An object of this invention is, therefore, to provide a recording andreproducing apparatus capable of a stable clock recovery irrespective alapse in time.

To attain the above object, an embodiment of the invention provides amechanism to enable to update the frequency information as needed. Thatis, the embodiment provides a recording and reproducing apparatuscomprising:

a receiving portion that receives broadcast data;

an extracting portion that extracts video data, audio data, and timeinformation from the broadcast data;

a counting portion that generates system time information from the timeinformation;

a clock generating portion that generates a clock signal in accordancewith which the counting portion is operated;

a decoding portion that decodes, using the clock signal generated by theclock generating portion, the video data and the audio data that areextracted by the extracting portion;

a recording portion that records the broadcast data; and

a control portion that operates to record, as needed and in therecording portion, a control variable based on which a frequency of theclock signal generated by the clock generating portion is controlledwhen the decoding portion decodes the video data and the audio data, andto control the clock generating portion by using the control variable sothat the system time information generated by the counting portionsynchronizes with the time information as extracted upon reception ofthe broadcast data.

According to this arrangement, when a program is reproduced from arecording medium, the control value or set value can be properly set, asneeded, by taking account of the deviation unique to each apparatus dueto circuitry design or others, or the deviation due to the reproductionenvironments, thereby enabling a stable clock recovery irrespective of alapse of time.

Thus, the embodiment of the invention can provide a recording andreproducing apparatus capable of a stable clock recovery.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart illustrating an example of a way of obtaining avalue of a control variable that makes a STC counter to stably operateat a frequency within a range defined by the MPEG-2 standard, accordingto a first embodiment of the invention.

FIG. 2 is a functional block diagram of a recording and reproducingapparatus according to the first embodiment.

FIG. 3 is a diagram of a pulse form of the STC counter according to aPWM control in the first embodiment.

FIG. 4 is a diagram illustrating change in the frequency of the STCcounter in the PWM control when a digital broadcasting program isreceived.

FIG. 5 is a functional block diagram of a recording and reproducingapparatus including an encoder, according to a second embodiment of theinvention.

FIG. 6 is a functional block diagram of a recording and reproducingapparatus including a plurality of decoding portions, according to athird embodiment of the invention.

FIG. 7 is a flowchart an example of a way of obtaining a value of acontrol variable that makes a STC counter to stably operate at afrequency within a range defined by the MPEG-2 standard, according tothe third embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Hereinafter, there will be described several presently preferredembodiments of the invention, in each of which the invention is appliedto an apparatus for receiving a stream in the format of MPEG2-TScurrently employed in broadcasting, and recording and reproducing thestream on and from a recording medium. However, it is to be understoodthat the embodiments are described only by way of example and the scopeof the invention is not limited to the details of the embodiments.

Referring first to FIG. 2, there is shown a structure of a digitalbroadcasting program recording and reproducing apparatus according to afirst embodiment. The digital broadcasting program recording andreproducing apparatus includes an input terminal 201, a tuner 202, anextracting portion 203, a recording medium 204, a control portion 205, aPWM control portion 206, a VCXO (Voltage Controlled CRYSTal Oscillator)207, a PCR obtaining portion 208, a STC counter 209, a STC counter 210,a video signal decoding portion 211, an audio signal decoding portion212, an output terminal 213, an output terminal decoding portion 601, amemory 215, and a system bus 216.

More specifically, the input terminal 201 is a terminal from which adigital broadcast signals transferred in the MPEG2-TS format isinputted. The tuner 202 receives or tunes in an input broadcast signals.The extracting portion 203 extracts only necessary data from the digitalbroadcast signals transferred from the tuner 202, and outputs theextracted data to a recording medium 204. Alternatively, the extractingportion 203 extracts video data, audio data, and time information fromthe digital broadcast signals, and outputs the video data, the audiodata, and the time information to the video signal decoding portion 211,the audio signal decoding portion 212, and the PCR obtaining portion208, respectively. Digital signals transferred from the recording medium204 are also subjected to the extraction by the extracting portion 203,namely, video data, audio data, and time information are extractedtherefrom to be outputted to the video signal decoding portion 211, theaudio signal decoding portion 212, and the PCR obtaining portion 208,respectively. The recording medium 204 is a medium on and from whichdigital broadcast signals are recorded and reproduced, and which dealsdata in the MPEG2-TS format employed in digital broadcasting.

The control portion 205 controls operation of the recording andreproducing apparatus. That is, the control portion 205 receives a PCRfrom the PCR obtaining portion 208, and makes a comparison between thePCR and a count of the STC counter 209/210. The control portion 205sends a control signal to the PWM control portion 206 based on a resultof the comparison, or alternatively, the control portion 205 directlycontrols the value set with respect to the VCXO 207 based on the resultof the comparison.

The PWM control portion 206 includes a comparator that makes thecomparison between the PCR and the count of the STC counter 209/210, anda D/A for converting the result of the comparison into a direct current.The PWM control portion 206 cooperates with the VCXO 207 to constitute aPLL (Phase Locked Loop), and controls the VCXO 207 such that an errorbetween the PCR and the count of the STC counter 209/210 is eliminatedor decreased when a digital broadcasting program is received.

The VCXO 207 generates and outputs clock pulses to the STC counter 209,210 in order to operate the STC counter 209, 210 in synchronization withthe clock pulses. A pulse width of the clock pulses is controlled by thePWM control portion 206 or the control portion 205.

The PCR obtaining portion 208 receives the PCR as time information fromthe extracting portion 203, and sets the count of the STC counter209/210 of the following stage at the value of the PCR and at the sametime transfers the PCR to the control portion 205 via the system bus215.

In other words, the STC counter 209/210 supplied with the PCR from thePCR obtaining portion 208 sets the value of the PCR as its count. Thecount of the STC counter 209/210 is incremented by referencing the clockgenerated by the VCXO 207. The count is supplied to the video signaldecoding portion 211 as needed.

The count of the STC counter 210 is incremented in the same way as theSTC counter 209, and supplied as needed to the audio signal decodingportion 212.

The video signal decoding portion 211 decodes and outputs the video dataor signals transferred from the extracting portion 203. At a timing whenthe count of the STC counter 209 sent therefrom and a DTS accompanying avideo signal coincide, decoding of the signal is performed. At a timingwhen the count and a PTS as time information coincide, the decoded videosignal is outputted to the output terminal 213.

The audio signal decoding portion 212 decodes and outputs the audio dataor signals transferred from the extracting portion 203. At a timing whenthe count of the STC counter 210 and a PTS as time informationaccompanying an audio signal coincide, decoding of the audio signal isperformed, and the decoded signal is outputted to the output terminaldecoding portion 601. The output terminals 213 and decoding portion 601are terminals from which the decoded video and audio data are outputted,respectively. The memory 215 stores a set value or a control variabledescribed later. The system bus 216 is for communication of instructionand data among the control portion 205 and the functional blocks 202,203, 205, 207-212.

In the thus constructed digital broadcasting program recording andreproducing apparatus, the digital broadcast signals inputted from theinput terminal 204, or the digital signals recorded in the recordingmedium 204, are outputted with the video and the audio synchronized witheach other.

When a digital broadcasting program is received, a PWM control isimplemented as described below, in order to stably operates the STCcounter 209/210.

For instance, as shown in FIG. 3, the PWM control portion 206 cancontrol the pulse width and interval of the clock pulses of the VCXO 207such that the frequency of a system clock generated by the VCXO is amultiple of that of the STC counter 209/210. The frequency of the VCXO207 is made 54 MHz in order to in turn make the frequency of the STCcounter 209/210 substantially at 27 MHz.

When this apparatus receives a digital broadcasting program, the PWMcontrol portion 206 controls the STC counter 209/210. Having tuned in ona station, the PCR obtaining portion 208 transfers the PCR to thecontrol portion 205, and the STC counter 209/210 transfers its/theircount(s) to the control portion 205. The control portion 205 comparesthe PCR to (each of) the count(s) to obtain a difference therebetween,and transfers a control signal based on the difference to the PWMcontrol portion 206. In accordance with the control signal, the PWMcontrol portion 206 changes the set value or control variable in orderthat the difference between the count and the PCR is eliminated ordecreased. That is, a single control variable or a plurality of controlvariables that can determine an output of the VXXO 207 to a uniquevalue, such as a voltage to be applied to the VCXO 207 and/or frequencyinformation, are used as a set value.

When a result of the comparison indicates that the PCR is larger thanthe count of the STC counter, the PWM control portion 206 changes theset value in order to decrease the pulse width of the output pulses ofthe VCXO 207. On the other hand, when the result of the comparisonindicates that the PCR is smaller than the count of the STC counter, thePWM control portion 206 changes the set value in order to increase thepulse width of the output pulses of the VCXO 207. By iterating the aboveprocess, the STC counters 209, 210 stably operate at a frequency lockedwith the PCR received, after a certain time has elapsed.

When the input to the apparatus is interrupted due to re-tuning in on astation by a user, the obtaining of the PCR becomes unavailable, therebymaking the pulse width of the VCXO as controlled by the PWM controlindeterminate. When the re-tuning in is complete and a stream is newlyinputted, referencing the PCR is resumed and the PWM control portion 206operates to have the frequency of the VCXO 207 and that of the STCcounter 209/210 as close as possible to each other, or coincident witheach other.

That is, as shown in FIG. 4, when a broadcast wave is received, the STCcounter 209/210 stably operates asymptotically at frequencies near 27MHz that is an ideal value, with a fluctuation around the timing of there-tuning in and decode completion, for instance.

The value of each of the at least one control variable that makes theSTC counter 209/210 to stably operate at a frequency or frequencieswithin the range defined by the MPEG-2 standard is to be recorded. Therecorded value is not fixed, but the control portion 205 updates thevalue to an optimum value as needed. More specifically, even after thecontrol variable is once recorded, each time a broadcast program isreceived, the control portion 205 obtains the value that makes thefrequency of the STC counter 209/210 stable in the defined range, andupdates the control variable as currently recorded in the memory 215 tothe newly obtained value. In this way, the optimum value of the controlvariable can be obtained as needed.

There will be now described a method of stably recover a clock whenrecorded digital signals are reproduced from the recording medium 204.Briefly described, the method is:

-   1. The value of the control variable that makes the STC counter to    stably operate at the frequency or frequencies within the range    defined by the MPEG-2 standard when a digital broadcasting program    is received is recorded in the digital broadcasting program    recording and reproducing apparatus.-   2. Thereafter, the VCXO 207 is controlled using the recorded value    of the control variable in order to stabilize the clock recovery.

First, there will be described a way of obtaining the value of thecontrol variable when the operation of the STC counter is stabilizedupon reception of a digital broadcasting program.

FIG. 1 illustrates an example of an operation to obtain the value ofeach of the at least one control variable when the operation of the STCcounter is stabilized upon reception of a digital broadcasting program.

A flow of the operation begins with step S101 to receive a digitalbroadcasting program, and the flow goes to step S102 in which theinitial value to be assigned to the VCXO 207 is determined, and the flowgoes to step S103. Thereafter, a PLL circuit constituted by the PWMcontrol portion 206 and the VCXO 207 operates to update the controlvariable each time a PCR is received, in order to ultimately obtain asystem clock without phase difference from the PCR. In step S103, aftera predetermined time has elapsed, the current value of the controlvariable is obtained to be compared with the previous value thereof.When a result of the comparison indicates that the current and previousvalues are the same, it is determined that a stable system clock isobtained and the flow goes to step S104. When the result of thecomparison indicates that the current and previous values differ fromeach other, the flow goes to a loop of repeating step S103. In stepS104, the control portion 205 operates to record the value as obtainedin step S103 at the predetermined variable in the memory 215, and permitreproduction from the recording medium 204, and the flow of this cycleterminates therewith.

With regard to setting of the predetermined time of which elapse iswaited for in step S104, when the predetermined time is relatively long,the value of the variable at which the frequency of the STC counter isstable is accordingly reliably obtained, but a relatively long time istaken to obtain such a value. Hence, the predetermined time should beappropriately set. The way of obtaining the value of the variable atwhich the frequency of the STC counter is stable may be modified suchthat when the same value is repeatedly detected a predetermined numberof times consecutively, with the predetermined time set to be relativelyshort, the value is recorded.

By iterating the above-described operation to obtain the value of thecontrol variable a plurality of times as described below, there isobtained a value of the control variable which enables a clock recoverythat stabilizes reproduction from the recording medium 204irrespectively of the change in the oscillating frequency of theoscillating element.

Example 1

Each time a value of the control variable that makes the frequency ofthe STC counter stable within the defined range is successfully obtainedupon reception of a broadcast wave, the control variable recorded in thememory 215 is updated to that value. When reproduction from therecording medium 204 is implemented, the value of the control variablecurrently recorded is used in the clock recovery. This enables a clockrecovery not influenced by the temperature characteristics, and changeover time, of the oscillator. As an example where the embodiment isbroadened, it may be arranged such that a plurality of values of thecontrol variable that make the frequency of the STC counter stable arerecorded in the memory 215, and when production is implemented, a valueof the control variable used for the clock recovery is obtained byobtaining an average of the values or other calculations.

Example 2

A value of the control variable is recorded, for each channel, in thememory 215. When a value that makes the frequency of the STC counterstable can be obtained upon reception of a broadcast program, thecontrol variable is updated for a channel corresponding to the broadcastprogram to that value. When reproduction from the recording medium 204is implemented, the channel corresponding to the program to bereproduced is identified, and the value of the control variable for thatchannel is used in the clock recovery. This enables a clock recoveryadapted to an encoder of a broadcast station.

In either of Examples 1 and 2, the place where the value detected isrecorded may be the recording medium 204.

Referring next to FIG. 5, there will be described a digital broadcastingprogram recording and reproducing apparatus according to a secondembodiment, that is obtained by adding an encoder to the digitalbroadcasting program recording and reproducing apparatus of the firstembodiment show in FIG. 2.

The encoder 501 receives video signals decoded at a video signaldecoding portion 211, and audio signals decoded at an audio signaldecoding portion 212, encodes the received signals based on clocksignals outputted from the VCXO 207, and outputs the encoded signals toan output terminal 502.

The output terminal 502 is connected to an external device such as thatof D-VHS. The data encoded at the encoder 501 is outputted to the outputterminal 502.

In the digital broadcast receiving (or recording and reproducing)apparatus, the encoder 501 can encode the data stably, by controllingthe VCXO 207 using the value of the control variable that makes thefrequency of a STC counter 209/210 stable and that can be obtained asdescribed above with respect to the first embodiment, in the same way asin the case of reproduction from the recording medium 204. The way ofrecording and reading the value of the control variable is identicalwith that of the first embodiment.

Referring now to FIG. 6, there will be described a digital broadcastingprogram recording and reproducing apparatus according to a thirdembodiment of the invention, that is obtained by modifying the digitalbroadcasting program recording and reproducing apparatus of the firstembodiment shown in FIG. 2 such that a portion from the PCR obtainingportion 208 to the audio signal decoding portion 212 is simplified intoa decoding portion 601, and there are added a decoding portion 602having the same structure as the decoding portion 601, an outputterminal 603 to which the decoding portion 602 outputs video signals asdecoded, and an output terminal 604 to which the decoding portion 602outputs audio signals as decoded.

FIG. 7 illustrates a procedure of generating a stable clock uponreproduction a program from a recoding medium 204 in this apparatus.

A flow of the procedure is initiated with step S701 in which a programof a channel that is the same as that of the program to be reproducedfrom the recoding medium 204 is received by a tuner 201, and the flowgoes to step S702.

In step S702, signals from the tuner 201 are decoded by the decodingportion 602, and the flow goes to step S703.

In step S703, a control portion 205 operates to perform a PWM controlusing PCR and a count of a SCT counter received from the decodingportion 602. A signal of a VCXO 207 thus obtained is inputted into thedecoding portion 601 and the decoding portion 602, and the flow goes tostep S704.

In step S704, the decoding portion 601 reproduces the program from therecording medium 204 using the clock signal obtained in step S703.

By the above-described operation, reproduction from the recording medium204 with a stable clock recovery is enabled, in the same way as in thecase where the value of the control variable is recorded in the memoryor others.

Each of the above-described embodiments is applicable to any apparatususing various recording media, as long as the apparatus receives adigital broadcasting program and records and reproduces the program,such as of HDD, DVD, and Blu-ray Disk. In the above description, eachembodiment has been described with respect to the MPEG2-TS format, butthe invention is applicable to any system where a reference value forclock generation is periodically transferred.

1. A recording and reproducing apparatus comprising: a receiving portionthat receives broadcast data contains video data, audio data, and timeinformation; a counting portion that generates system time informationfrom the time information; a clock generating portion that generates aclock signal in accordance with an operation of the counting portion; adecoding portion that decodes, using the system time informationgenerated by the counting portion, the video data and the audio data; arecording portion that records the broadcast data; and a control portionthat operates to record a control variable based on which a frequency ofthe clock signal generated by the clock generating portion is controlledwhen the decoding portion decodes the video data and the audio data fromreceiving portion, and to control the clock generating portion by usingthe control variable when the decoding portion decodes the video dataand the audio data recorded in the recording portion.
 2. The recordingand reproducing apparatus according to claim 1, wherein the controlportion instructs to update the control variable as needed.
 3. Therecording and reproducing apparatus according to claim 2, wherein thecontrol portion instructs to update the control variable, when a signalinstructing to update the control variable is inputted.
 4. A recordingand reproducing apparatus comprising: a tuner that receives a digitalbroadcast signal which contains video data, audio data, and timeinformation; a counter that generates system time information from thetime information; a clock generating portion that generates a clocksignal in accordance with an operation of the counter; a decoder thatdecodes, by referencing the system time information generated by thecounter, the video data and the audio data; a recording medium thatrecords the digital broadcast signal; a control portion that operates torecord a control variable based on which a frequency of the clock signalgenerated by the clock generating portion is controlled when the decoderdecodes the video data and the audio data from the tuner, and to controlthe clock generating portion by using the control variable when thedecoder decodes the video data and the audio data recorded in therecording medium.
 5. The receiving apparatus according to claim 4,wherein the control portion operates to update the control variable asneeded.
 6. A receiving apparatus comprising: a tuner that receives adigital broadcast signal which contains video data, audio data, and timeinformation; a counter that generates system time information from thetime information; a clock generating portion that generates a clocksignal in accordance with an operation of the counter; a decoder thatdecodes, by referencing the system time information, the video data andthe audio data; an encoder that encodes the video data and the audiodata as decoded by the decoder, based on the clock signal generated bythe clock generating portion; and a control portion that controls theclock generating portion, when the encoder encodes the video data andthe audio data, by using a control variable based on which a frequencyof the clock signal generated by the clock generating portion iscontrolled when the decoder decodes the video data and the audio datafrom the tuner.
 7. The receiving apparatus according to claim 6, whereinthe control portion operates to update the control variable as needed.